/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.bayu.services.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Bayu
 */
@Entity
@Table(name = "rekap_kecelakaan_kerja")
@NamedQueries({@NamedQuery(name = "RekapKecelakaanKerja.findAll", query = "SELECT r FROM RekapKecelakaanKerja r"), @NamedQuery(name = "RekapKecelakaanKerja.findById", query = "SELECT r FROM RekapKecelakaanKerja r WHERE r.id = :id"), @NamedQuery(name = "RekapKecelakaanKerja.findByLalu5", query = "SELECT r FROM RekapKecelakaanKerja r WHERE r.lalu5 = :lalu5"), @NamedQuery(name = "RekapKecelakaanKerja.findByLalu4", query = "SELECT r FROM RekapKecelakaanKerja r WHERE r.lalu4 = :lalu4"), @NamedQuery(name = "RekapKecelakaanKerja.findByLalu3", query = "SELECT r FROM RekapKecelakaanKerja r WHERE r.lalu3 = :lalu3"), @NamedQuery(name = "RekapKecelakaanKerja.findByLalu2", query = "SELECT r FROM RekapKecelakaanKerja r WHERE r.lalu2 = :lalu2"), @NamedQuery(name = "RekapKecelakaanKerja.findByLalu1", query = "SELECT r FROM RekapKecelakaanKerja r WHERE r.lalu1 = :lalu1")})
public class RekapKecelakaanKerja implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Long id;
    @Basic(optional = false)
    @Column(name = "lalu5")
    private int lalu5;
    @Basic(optional = false)
    @Column(name = "lalu4")
    private int lalu4;
    @Basic(optional = false)
    @Column(name = "lalu3")
    private int lalu3;
    @Basic(optional = false)
    @Column(name = "lalu2")
    private int lalu2;
    @Basic(optional = false)
    @Column(name = "lalu1")
    private int lalu1;

    public RekapKecelakaanKerja() {
    }

    public RekapKecelakaanKerja(Long id) {
        this.id = id;
    }

    public RekapKecelakaanKerja(Long id, int lalu5, int lalu4, int lalu3, int lalu2, int lalu1) {
        this.id = id;
        this.lalu5 = lalu5;
        this.lalu4 = lalu4;
        this.lalu3 = lalu3;
        this.lalu2 = lalu2;
        this.lalu1 = lalu1;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public int getLalu5() {
        return lalu5;
    }

    public void setLalu5(int lalu5) {
        this.lalu5 = lalu5;
    }

    public int getLalu4() {
        return lalu4;
    }

    public void setLalu4(int lalu4) {
        this.lalu4 = lalu4;
    }

    public int getLalu3() {
        return lalu3;
    }

    public void setLalu3(int lalu3) {
        this.lalu3 = lalu3;
    }

    public int getLalu2() {
        return lalu2;
    }

    public void setLalu2(int lalu2) {
        this.lalu2 = lalu2;
    }

    public int getLalu1() {
        return lalu1;
    }

    public void setLalu1(int lalu1) {
        this.lalu1 = lalu1;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof RekapKecelakaanKerja)) {
            return false;
        }
        RekapKecelakaanKerja other = (RekapKecelakaanKerja) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bayu.services.entity.RekapKecelakaanKerja[id=" + id + "]";
    }

}
